

VOL File Format
---------------

Offset 	Size 			Description
------ 	---- 			-----------
0x0	8			SectionTag - "VOL " - Volume
0x8	8			SectionTag - "volh" - VolumeHeader
0x10	8			SectionTag - "vols" - VolumeStringTable - filenames of all internal files
0x18	4			DWORD actualStringDataLen
0x1C	SectionSize-4		List of NULL terminated strings, followed by zero padding up to the section's size
	8			SectionTag - "voli" - VolumeIndex
	SectionSize		IndexEntry indexTable[], followed by zero padding up to the section's size
- - - - - - - - - - - - - - - - - - - - - -
The following is repeated for each file stored internally
	8			SectionTag - "VBLK" - VolumeDataBlock
	SectionSize		Internal file data
-------------------------------------------

Note: The index must be sorted according to the fileName
      referenced by the fileNameOffset field of the IndexEntry
      structure. Failure to do so will cause files to be 
      reported as non existent.
      (A binary search is used to lookup the files)
Note: All unused index table entries must occur at the end of
      the index table. Unused entries in the middle of the table
      can cause valid entries to be not found.
      (The index is searched using a binary search and in the 
      case of an unused index, the search always continues
      in the lower half of the remaining index entries.)
Note: Unused index table entries should have boolUsed set to 0
      and the fileNameOffset set to -1.


Data Structures
---------------
SectionTag
{
	DWORD 		sectionName  // 4 byte section tag/name
	DWORD:31	sectionSize  // 31 bit section size
	DWORD:1		alignmentBit // alignment for section size
			// 0 - WORD aligned
			// 1 - DWORD aligned
}
Note: The sectionSize is only adjusted for the "volh", "voli" section?

IndexEntry
{
	DWORD fileNameOffset	// Offset in string table
	DWORD dataOffset	// Offset to the data in the VOL file
	DWORD dataLength	// Length of the internal file data
	BYTE compressionCode	// Compression used on file data
	BYTE boolUsed		// Indicates IndexEntry is valid
}
Note: The compression value should be one of:
	0 Uncompressed
	1 RLE
	2 LZ
	3 LZH
      Compression values out side of this range can cause unstable
      behavior.
Note: boolUsed should be set to 1 for used entries and 0 for
      unused entries. Other values may cause improper operation.
      (A true value for boolUsed is tested against 1 rather than
      tested for being different from 0)



Loading Notes
-------------

Outpost2.exe loads the Vol files using memory mapping. All reading
is done through StreamIO or StreamIO derived objects.

